namespace SimpleWebServices.Globalization
{
    using System;
    using System.Globalization;
    using System.Threading;

    public static class CultureInfoExtensionMethods
    {
        public static void SetCurrentCulture(this CultureInfo language)
        {
            if (null == language)
            {
                throw new ArgumentNullException("language");
            }
            else if (CultureInfo.InvariantCulture == language)
            {
                throw new ArgumentOutOfRangeException("language");
            }

            Thread.CurrentThread.CurrentUICulture = language;
            /// TODO : throw new NotSupportedException();
        }
    }
}